ssh -X root@10.8.1.200
nohup /usr/dt/bin/dtterm -name `hostname` -display 10.8.1.213:0.0 &
su - oracle
nohup /usr/dt/bin/dtterm -name oracle@`hostname` -display 10.8.1.213:0.0 &

su - wang
thunderbird

cd /cds/workspace/mysqlperformance
export CDS_HOME=`pwd`
export CDS_BASE=`dirname $CDS_HOME`
export CDS_TOOLS=$CDS_BASE/dependencies
export PATH=.:$CDS_HOME/bin:$CDS_HOME/modules/internal/perftest/src/scripts/cdsadmin/:$CDS_HOME/tools:$CDS_TOOLS/tools:$PATH
# JAVA_HOME=/cds/jdk1.5.0_11/; export JAVA_HOME
# PATH=.:${CDS_HOME}/bin:${JAVA_HOME}/bin:${PATH}; export PATH
env | grep ^CDS
echo $PATH | tr ":" "\n"
nohup /usr/dt/bin/dtterm -name `hostname`/mysqlperformance -display 10.8.1.213:0.0 &

# startup MySQL with InnoDB engine
nohup /opt/mysql/mysql/bin/mysqld --basedir=/opt/mysql/mysql --datadir=/var/lib/mysql --user=mysql --default-storage-engine=InnoDB --log-error=/var/lib/mysql/sol10-test.err --open-files-limit=8192 --pid-file=/var/lib/mysql/sol10-test.pid --socket=/tmp/mysql.sock --port=3306 &
mysql -u root -pq1w2e3 <<EOF
use mysql
show tables;
EOF

cdst buildall

# build perftest
cd $CDS_HOME/modules/
cdst build internal/perftest

####################################################
cd $CDS_HOME/modules/internal/perftest/src/scripts/cdsadmin
chmod +X cdsa
./cdsa pack



# Please read it first in the morning. Jack Zou

/cds/workspace/mysqlperformance/deployment/Sun_Java_System_Content_Delivery_Server_5.1_ga/deployment/cds/sun/domains/cdsdomain/logs/server.log
/cds/workspace/mysqlperformance/deployment/Sun_Java_System_Content_Delivery_Server_5.1_ga/cfg/registry/cds/cds.log

diff /cds/workspace/{mysqlperformance,mysqlprototype}/deployment/cds/sun/domains/cdsdomain/config/

for i in `cat /tmp/output`; do
echo $i | sed 's/[0-z|/]/-/g'
echo $i
echo $i | sed 's/[0-z|/]/-/g'
diff $i /cds/workspace/mysqlperformance/deployment/cds/sun/domains/cdsdomain/config/`basename $i`
done > /tmp/output1

for i in /cds/workspace/mysqlprototype/modules/*/src; do diff $i ${i/prototype/performance}; done

# create the topest 4 level directory of /cds/workspace
for i in /cds/workspace/*/*/*/*; do test -d $i && mkdir -p /tmp/$i; done; cd /tmp/; tar cvf workspace.tar cds/*

cat > $CDS_HOME/bin/init_env.sh <<EOF
export BEA_HOME=/opt
export WL_HOME=/opt
export SUN_AS_HOME=/cds/glassfish/
export JAVA_HOME=/usr/java
export DEFAULT_DEPL=cds
export DEFAULT_CONFIG=cds.cfg
export DEFAULT_DB=cdsDBConf.xml
export DEFAULT_SYS_USER=cdsDBSysUser.xml
EOF

cat > $CDS_HOME/modules/internal/perftest/src/scripts/cdsa_wrapper_scripts/env.sh <<EOF
#!/usr/bin/sh
# Environment variable file for Single Server deployment (CS + VS1)

################### SETTINGS FOR CDS DEPLOYMENT #######################
#
# CDS_RELEASE=/export/home/performance/handson/release/Sun_Java_System_Content_Delivery_Server_5.1.zip
# CDS_HOME_PARENT=/export/home/performance/handson/deployment
# BINARY="Sun_Java_System_Content_Delivery_Server*"
# CDSA_TOOLS=/export/home/performance/handson/workspace/trunk/toolpack.zip
# PERFTEST_JAR=/export/home/performance/handson/workspace/trunk/modules/internal/perftest/dist/perftest.jar
#
# PATCH_DEPLOY=false
# CDS_PATCH=/net/ceres.sfbay/export12/jscds/sentinel_preview/promoted/b04/*.zip
#
#
# ANT_HOME=/export/home/performance/handson/workspace/dependencies/tools/apache-ant-1.7.0
#

# CDS_RELEASE=\${CDS_BASE}/release/Sun_Java_System_Content_Delivery_Server_5.1_ga.zip
# CDS_HOME_PARENT=\${CDS_HOME}/deployment
BINARY="Sun_Java_System_Content_Delivery_Server*"
CDSA_TOOLS=\${CDS_HOME}/toolpack.zip
PERFTEST_JAR=\${CDS_HOME}/modules/internal/perftest/dist/perftest.jar
PATCH_DEPLOY=false
CDS_PATCH=/net/ceres.sfbay/export12/jscds/sentinel_preview/promoted/b04/*.zip
ANT_HOME=\${CDS_BASE}/dependencies/tools/apache-ant-1.7.0

#
################## MISC SETTING ####################

DEPLOYMENT_NAME=cds

############## PLATFORM SETTINGS ####################

#APP_SERVER=wl
APP_SERVER=sn
CDS_HOST=sol10-test
PORT=7070
SSL_PORT=8081
ADMIN_PORT=7878
UPPER_HEAP=1024
LOWER_HEAP=1024
DEBUG_MODE=WARNING

BEA_HOME=/opt
WL_HOME=\${BEA_HOME}
JAVA_HOME=/usr/java/
SUN_AS_HOME=/cds/glassfish/
AS_ACCEPTOR_THREADS=24
JNDI_HOST=\$CDS_HOST
JNDI_PORT=\$PORT
JMS=server
JMS_HOST=\$CDS_HOST
# For a multi-vending deployment if JMS=client then the following variable is not useful.
JMS_PORT=7676

#################COMPONENT SETTINGS #####################

# set the following all components to true for a SS deployment
# set the following two components to false for a VS deployment

CS_ENABLE=true
DP_ENABLE=true

# set the following components to false for a CS deployment #######

VS_ENABLE=true
SP_ENABLE=true
FS_ENABLE=true

VS_ACCOUNT=cds.vending.server.1

ES_ENABLE=true
MS_ENABLE=true
NS_ENABLE=true
PPS_ENABLE=true
MOS_ENABLE=true
CSS_ENABLE=true
VSS_ENABLE=true

CS_HOST=\$CDS_HOST
DP_HOST=\$CDS_HOST
FS_HOST=\$CDS_HOST
VS_HOST=\$CDS_HOST
SP_HOST=\$CDS_HOST
ES_HOST=\$CDS_HOST
MS_HOST=\$CDS_HOST
NS_HOST=\$CDS_HOST
PPS_HOST=\$CDS_HOST
MOS_HOST=\$CDS_HOST
CSS_HOST=\$CDS_HOST
VSS_HOST=\$CDS_HOST

CS_PORT=\$PORT
DP_PORT=\$PORT
FS_PORT=\$PORT
VS_PORT=\$PORT
SP_PORT=\$PORT
ES_PORT=\$PORT
MS_PORT=\$PORT
NS_PORT=\$PORT
PPS_PORT=\$PORT
MOS_PORT=\$PORT
CSS_PORT=\$PORT
VSS_PORT=\$PORT

CS_DB_POOL=4
DP_DB_POOL=4
SP_DB_POOL=100
VS_DB_POOL=100
FS_DB_POOL=100
ES_DB_POOL=100
PPS_DB_POOL=100
RS_DB_POOL=100
CDS_HOME_EXISTS=no

DBNAME=mysql
JDBC_DRIVER=\$CDS_HOME/mysql-connector-java-5.1.7/mysql-connector-java-5.1.7-bin.jar
##################### DATABASE SETTINGS #############
# ORACLE_SID=CDSDB
# ORACLE_SYS_PASSWD=cds123
# ORACLE_VERSION=10i
# PREFIX=sowmya_handson

ORACLE_HOST=10.8.1.200
ORACLE_PORT=1521
ORACLE_HOME=/sol11/u01/app/oracle/product/11.1.0/db_1
ORACLE_SID=ORCL
ORACLE_SYS_USER=system
ORACLE_SYS_PASSWD=q1w2e3
ORACLE_VERSION=11g
ORACLE_SERVER_ID=DBServer1
PREFIX=jzou
DB_PASSWD=q1w2e3

##################### DATABASE SETTINGS #############

MYSQL_HOST=10.8.1.200
MYSQL_PORT=3306
MYSQL_HOME=/opt/mysql/mysql
MYSQL_SID=pscdsdb
MYSQL_SYS_USER=root
MYSQL_SYS_PASSWD=q1w2e3
MYSQL_VERSION=5.1.3
MYSQL_SERVER_ID=DBServer1
PREFIX=jzou
DB_PASSWD=q1w2e3

DEFAULT_TS=USERS
TEMP_TS=TEMP
CATALOG_TS=USERS
CATALOG_IX_TS=USERS
CONTENT_TS=USERS
CONTENT_IX_TS=USERS
EVENT_TS=USERS
EVENT_IX_TS=USERS
VENDING_TS=USERS
VENDING_IX_TS=USERS
SUBSCRIBER_TS=USERS
SUBSCRIBER_IX_TS=USERS

VENDING_ACCOUNTS="cds.vending.server.1@\$CDS_HOST:\$PORT"

###################### DATACFG SETTINGS ####################

ONESTEP=95
TWOSTEP=1
SUB_BASE=1000000
SUB_PREFIX=sub
SUB_COUNT=2000000
WIDTH=6
DEPTH=3
CONTENT_SAMPLES=1
CAT_SIZE=1
PUBLISH=WIDTH**DEPTH
MULTIPLIER=32
CDS_REG="\$CDS_HOME/cfg/registry"
######################### TBD TBD TBD TBD ########################

#CDS_HOME=${CDS_HOME_PARENT}/*
#PATH=/export/home/oracle/bin:/shared/dp/k2/all/sparc/bin:/bin:/usr/bin:/usr/sbin:/usr/ucb:/opt/local/bin:/usr/ccs/bin:/usr/openwin/bin:/etc:/usr/dist/exe:/export/cds/bin:/net/jalapi/tools/build/share/ant-1.4.1/bin

PATH=\$ORACLE_HOME/bin:/bin:/usr/bin:/usr/sbin:/usr/ucb:/usr/ccs/bin:/usr/openwin/bin:/etc:/usr/dist/exe:\$ANT_HOME/bin:

#REXEC_LOC=/net/mumble/master_ws/cp-qa-tools/solaris_bin/rexec
#R_USER=root
#R_PASS=!ncffpi!
#RCMD="\${REXEC_LOC} \${CDS_HOST} -l \${R_USER} -p \${R_PASS}"

#######################  EXPORT the variables #####################

export CDS_RELEASE
export CDS_HOME_PARENT
export BINARY
export CDSA_TOOLS
export PERFTEST_JAR

export PATH
export PATCH_DEPLOY
export CDS_PATCH
export CDS_HOME_EXISTS

export DEPLOYMENT_NAME

export APP_SERVER
export CDS_HOST
export PORT
export SSL_PORT
export ADMIN_PORT
export UPPER_HEAP
export LOWER_HEAP
export DEBUG_MODE

export BEA_HOME
export WL_HOME
export JAVA_HOME
export SUN_AS_HOME
export JNDI_HOST
export JNDI_PORT
export JMS
export JMS_HOST
#export JMS_PORT

export CS_ENABLE
export DP_ENABLE
export VS_ENABLE
export SP_ENABLE
export FS_ENABLE

export VS_ACCOUNT

export ES_ENABLE
export MS_ENABLE
export NS_ENABLE
export PPS_ENABLE
export MOS_ENABLE
export CSS_ENABLE
export VSS_ENABLE

export CS_HOST
export DP_HOST
export FS_HOST
export VS_HOST
export SP_HOST
export ES_HOST
export MS_HOST
export NS_HOST
export PPS_HOST
export MOS_HOST
export CSS_HOST
export VSS_HOST

export CS_PORT
export DP_PORT
export FS_PORT
export VS_PORT
export SP_PORT
export ES_PORT
export MS_PORT
export NS_PORT
export PPS_PORT
export MOS_PORT
export CSS_PORT
export VSS_PORT

export CS_DB_POOL
export DP_DB_POOL
export SP_DB_POOL
export VS_DB_POOL
export FS_DB_POOL
export ES_DB_POOL
export PPS_DB_POOL
export RS_DB_POOL

export ORACLE_HOST
export ORACLE_PORT
export ORACLE_HOME
export ORACLE_SID
export ORACLE_SYS_USER
export ORACLE_SYS_PASSWD
export ORACLE_VERSION
export ORACLE_SERVER_ID
export PREFIX
export DB_PASSWD

export DEFAULT_TS
export TEMP_TS
export CATALOG_TS
export CATALOG_IX_TS
export CONTENT_TS
export CONTENT_IX_TS
export EVENT_TS
export EVENT_IX_TS
export VENDING_TS
export VENDING_IX_TS
export SUBSCRIBER_TS
export SUBSCRIBER_IX_TS

export VENDING_ACCOUNTS

export ONESTEP
export TWOSTEP
export SUB_BASE
export SUB_PREFIX
export SUB_COUNT
export WIDTH
export DEPTH
export CONTENT_SAMPLES
export CAT_SIZE
export PUBLISH
export MULTIPLIER
EOF

setup.sh

